package com.itheima.tlias84.mapper;

import com.itheima.tlias84.entity.Expr;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ExprMapper {

    /**
     * 批量插入工作经历
     * @param list
     * @return
     */
    int batchInsertExpr(@Param("list") List<Expr> list );

    /**
     * 批量删除工作经历
     * @param ids
     * @return
     */
    int batchDeleteExpr(@Param("ids") List<Integer> ids);

    /**
     * 回显工作经验
     * @param empId
     * @return
     */
    @Select("select id,company,job,emp_id, begin,end from expr where emp_id=#{empId}")
    List<Expr> selectExprByEmpId(@Param("empId") Integer empId);

}
